inherited FrmEntregaArmacoes: TFrmEntregaArmacoes
  Left = 261
  Top = 131
  Caption = 'Entregas e Arma'#231#245'es'
  ClientHeight = 516
  ClientWidth = 792
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 479
    Width = 792
    inherited Bitfecha: TBitBtn
      Left = 519
    end
    object btnRelatorio: TBitBtn
      Left = 444
      Top = 5
      Width = 74
      Height = 26
      Hint = ' Localiza Registro '
      Caption = '&Listar'
      ParentShowHint = False
      ShowHint = True
      TabOrder = 7
      OnClick = btnRelatorioClick
      Glyph.Data = {
        76010000424D7601000000000000760000002800000020000000100000000100
        04000000000000010000130B0000130B00001000000000000000000000000000
        800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00300000000000
        00033FFFFFFFFFFFFFFF0888888888888880777777777777777F088888888888
        8880777777777777777F0000000000000000FFFFFFFFFFFFFFFF0F8F8F8F8F8F
        8F80777777777777777F08F8F8F8F8F8F9F0777777777777777F0F8F8F8F8F8F
        8F807777777777777F7F0000000000000000777777777777777F3330FFFFFFFF
        03333337F3FFFF3F7F333330F0000F0F03333337F77773737F333330FFFFFFFF
        03333337F3FF3FFF7F333330F00F000003333337F773777773333330FFFF0FF0
        33333337F3FF7F3733333330F08F0F0333333337F7737F7333333330FFFF0033
        33333337FFFF7733333333300000033333333337777773333333}
      NumGlyphs = 2
    end
  end
  inherited Panel2: TPanel
    Width = 792
    Height = 479
    inherited Panel3: TPanel
      Width = 790
      Caption = 'Entregas e Arma'#231#245'es'
      inherited GroupBox1: TGroupBox
        Left = 711
      end
    end
    inherited Panel4: TPanel
      Width = 790
      Height = 437
      object Label12: TLabel [0]
        Left = 360
        Top = 8
        Width = 105
        Height = 13
        Caption = 'Documento de Sa'#237'da:'
      end
      object Label14: TLabel [1]
        Left = 80
        Top = 8
        Width = 44
        Height = 13
        Caption = 'Empresa:'
      end
      object Label1: TLabel [2]
        Left = 16
        Top = 8
        Width = 58
        Height = 13
        Caption = 'Documento:'
        FocusControl = DBEditDocumento
      end
      inherited SbHints: TStatusBar
        Top = 414
        Width = 782
      end
      object gbxExecucao: TGroupBox
        Left = 16
        Top = 352
        Width = 761
        Height = 59
        Caption = 'Execu'#231#227'o'
        TabOrder = 11
        object Label10: TLabel
          Left = 400
          Top = 15
          Width = 92
          Height = 13
          Caption = 'Data de Execu'#231#227'o:'
          FocusControl = DBEditDataExec
        end
        object Label11: TLabel
          Left = 496
          Top = 15
          Width = 92
          Height = 13
          Caption = 'Hora de Execu'#231#227'o:'
          FocusControl = DBEditHoraExec
        end
        object Label15: TLabel
          Left = 8
          Top = 15
          Width = 65
          Height = 13
          Caption = 'Respons'#225'vel:'
          FocusControl = DBEditResponsavel
        end
        object DBEditDataExec: TDBEdit
          Left = 400
          Top = 31
          Width = 89
          Height = 21
          DataField = 'EAR_DATAEXECUCAO'
          DataSource = DtSrc
          TabOrder = 4
        end
        object DBEditHoraExec: TDBEdit
          Left = 496
          Top = 31
          Width = 89
          Height = 21
          DataField = 'EAR_HORAEXECUCAO'
          DataSource = DtSrc
          TabOrder = 5
        end
        object DBCkServico: TDBCheckBox
          Left = 272
          Top = 35
          Width = 113
          Height = 17
          Caption = 'Servi'#231'o Executado'
          DataField = 'EAR_EXECUTADO'
          DataSource = DtSrc
          TabOrder = 3
          ValueChecked = 'S'
          ValueUnchecked = 'N'
        end
        object dgSatisfacao: TDBRadioGroup
          Left = 600
          Top = 15
          Width = 153
          Height = 37
          Caption = 'Satisfa'#231#227'o'
          Columns = 2
          DataField = 'EAR_SATISFACAO'
          DataSource = DtSrc
          Items.Strings = (
            'Satisfeito'
            'Insatisfeito')
          TabOrder = 6
          Values.Strings = (
            'S'
            'I')
        end
        object DBEditResponsavel: TDBEdit
          Left = 8
          Top = 31
          Width = 43
          Height = 21
          DataField = 'EAR_RESPONSAVEL'
          DataSource = DtSrc
          TabOrder = 0
          OnExit = DBEditResponsavelExit
        end
        object BitBtn2: TBitBtn
          Left = 53
          Top = 31
          Width = 21
          Height = 21
          Caption = '...'
          TabOrder = 1
          TabStop = False
          OnClick = BitBtn2Click
        end
        object stResponsavel: TStaticText
          Left = 75
          Top = 31
          Width = 190
          Height = 21
          AutoSize = False
          BorderStyle = sbsSingle
          TabOrder = 2
        end
      end
      object DBGridItens: TDBGrid
        Left = 16
        Top = 192
        Width = 761
        Height = 129
        DataSource = DtsrcItens
        Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
        TabOrder = 7
        TitleFont.Charset = ANSI_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'MS Sans Serif'
        TitleFont.Style = []
        Columns = <
          item
            Expanded = False
            FieldName = 'EAI_SEQUENCIAL'
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'EAI_SAIDADOC'
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'EAI_SAIDAITEM'
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'Descricao'
            Title.Caption = 'Descri'#231#227'o:'
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'EAI_QTDARMACAO'
            Title.Caption = 'Quantidade Arma'#231#227'o:'
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'EAI_QTDENTREGA'
            Title.Caption = 'Quantidade Entrega:'
            Visible = True
          end>
      end
      object btnDocSaida: TBitBtn
        Left = 355
        Top = 24
        Width = 21
        Height = 21
        Caption = '...'
        TabOrder = 3
        OnClick = btnDocSaidaClick
      end
      object stCliente: TStaticText
        Left = 379
        Top = 24
        Width = 398
        Height = 21
        AutoSize = False
        BorderStyle = sbsSingle
        TabOrder = 5
      end
      object pnlDocumento: TPanel
        Left = 16
        Top = 48
        Width = 761
        Height = 137
        BorderWidth = 2
        TabOrder = 6
        object Label2: TLabel
          Left = 152
          Top = 8
          Width = 49
          Height = 13
          Caption = 'Endere'#231'o:'
          FocusControl = DBEditEndereco
        end
        object Label9: TLabel
          Left = 8
          Top = 88
          Width = 45
          Height = 13
          Caption = 'Telefone:'
          FocusControl = DBEditComplemento
        end
        object Label8: TLabel
          Left = 328
          Top = 48
          Width = 63
          Height = 13
          Caption = 'Observa'#231#245'es'
          FocusControl = DBMmObservacoes
        end
        object Label4: TLabel
          Left = 8
          Top = 48
          Width = 36
          Height = 13
          Caption = 'Estado:'
          FocusControl = DBEditEstado
        end
        object Label3: TLabel
          Left = 440
          Top = 8
          Width = 30
          Height = 13
          Caption = 'Bairro:'
          FocusControl = DBEditBairro
        end
        object Label5: TLabel
          Left = 64
          Top = 48
          Width = 36
          Height = 13
          Caption = 'Cidade:'
          FocusControl = DBEditCidade
        end
        object Label7: TLabel
          Left = 80
          Top = 8
          Width = 67
          Height = 13
          Caption = 'Hora Prevista:'
          FocusControl = DBEditHoraPrevista
        end
        object Label6: TLabel
          Left = 8
          Top = 8
          Width = 67
          Height = 13
          Caption = 'Data Prevista:'
          FocusControl = DBEditDataPrevista
        end
        object DBEditEndereco: TDBEdit
          Left = 152
          Top = 24
          Width = 281
          Height = 21
          DataField = 'EAR_ENDERECO'
          DataSource = DtSrc
          TabOrder = 2
        end
        object DBEditComplemento: TDBEdit
          Left = 8
          Top = 104
          Width = 313
          Height = 21
          DataField = 'EAR_COMPLEMENTO'
          DataSource = DtSrc
          TabOrder = 9
        end
        object DBMmObservacoes: TDBMemo
          Left = 328
          Top = 63
          Width = 425
          Height = 62
          DataField = 'EAR_OBSEVACOES'
          DataSource = DtSrc
          TabOrder = 10
        end
        object DBEditEstado: TDBEdit
          Left = 8
          Top = 64
          Width = 30
          Height = 21
          DataField = 'EAR_ESTADO'
          DataSource = DtSrc
          TabOrder = 4
        end
        object DBEditCidade: TDBEdit
          Left = 64
          Top = 64
          Width = 41
          Height = 21
          DataField = 'EAR_CIDADE'
          DataSource = DtSrc
          TabOrder = 5
          OnExit = DBEditCidadeExit
        end
        object DBEditBairro: TDBEdit
          Left = 440
          Top = 24
          Width = 313
          Height = 21
          DataField = 'EAR_BAIRRO'
          DataSource = DtSrc
          TabOrder = 3
        end
        object DBEditHoraPrevista: TDBEdit
          Left = 80
          Top = 24
          Width = 65
          Height = 21
          DataField = 'EAR_HORAPREVISTA'
          DataSource = DtSrc
          TabOrder = 1
        end
        object DBEditDataPrevista: TDBEdit
          Left = 8
          Top = 24
          Width = 65
          Height = 21
          DataField = 'EAR_DATAPREVISTA'
          DataSource = DtSrc
          TabOrder = 0
        end
        object btnEstado: TBitBtn
          Left = 40
          Top = 64
          Width = 21
          Height = 21
          Caption = '...'
          TabOrder = 7
          TabStop = False
          OnClick = btnEstadoClick
        end
        object btnCidade: TBitBtn
          Left = 106
          Top = 64
          Width = 21
          Height = 21
          Caption = '...'
          TabOrder = 8
          TabStop = False
          OnClick = btnCidadeClick
        end
        object stCidade: TStaticText
          Left = 128
          Top = 64
          Width = 193
          Height = 21
          AutoSize = False
          BorderStyle = sbsSingle
          TabOrder = 6
        end
      end
      object btnAdicionarItem: TBitBtn
        Left = 16
        Top = 328
        Width = 97
        Height = 25
        Caption = 'Adicionar Item'
        Enabled = False
        TabOrder = 8
        OnClick = btnAdicionarItemClick
      end
      object btnQtdEntrega: TBitBtn
        Left = 113
        Top = 328
        Width = 104
        Height = 25
        Caption = 'Editar Quantidade'
        Enabled = False
        TabOrder = 9
        OnClick = btnQtdEntregaClick
      end
      object btnExcluirItem: TBitBtn
        Left = 217
        Top = 328
        Width = 75
        Height = 25
        Caption = 'Excluir Item'
        Enabled = False
        TabOrder = 10
        OnClick = btnExcluirItemClick
      end
      object edtEmpresa: TEdit
        Left = 80
        Top = 24
        Width = 57
        Height = 21
        TabOrder = 1
        OnExit = edtEmpresaExit
      end
      object btnEmpresa: TBitBtn
        Left = 138
        Top = 24
        Width = 21
        Height = 21
        Caption = '...'
        TabOrder = 2
        TabStop = False
        OnClick = btnEmpresaClick
      end
      object stEmpresa: TStaticText
        Left = 160
        Top = 24
        Width = 193
        Height = 21
        AutoSize = False
        BorderStyle = sbsSingle
        TabOrder = 4
      end
      object DBEditDocumento: TDBEdit
        Left = 16
        Top = 24
        Width = 57
        Height = 21
        DataField = 'EAR_DOCUMENTO'
        DataSource = DtSrc
        TabOrder = 0
      end
    end
  end
  inherited DtSrc: TDataSource
    AutoEdit = False
    DataSet = CDS_ENTREGAS
    OnStateChange = DtSrcStateChange
    Left = 328
    Top = 117
  end
  object CDS_ENTREGAS: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'EAR_ID'
        ParamType = ptUnknown
        Value = 0
      end>
    ProviderName = 'DSP_ENTREGAS'
    AfterOpen = CDS_ENTREGASAfterOpen
    BeforeClose = CDS_ENTREGASBeforeClose
    AfterInsert = CDS_ENTREGASAfterInsert
    AfterApplyUpdates = CDS_ENTREGASAfterApplyUpdates
    Left = 409
    Top = 57
    object CDS_ENTREGASEAR_ID: TIntegerField
      FieldName = 'EAR_ID'
      Required = True
    end
    object CDS_ENTREGASEAR_DOCUMENTO: TStringField
      DisplayLabel = 'Documento:'
      FieldName = 'EAR_DOCUMENTO'
      Required = True
      Size = 13
    end
    object CDS_ENTREGASEAR_ENDERECO: TStringField
      DisplayLabel = 'Endere'#231'o:'
      FieldName = 'EAR_ENDERECO'
      Required = True
      Size = 40
    end
    object CDS_ENTREGASEAR_BAIRRO: TStringField
      DisplayLabel = 'Bairro:'
      FieldName = 'EAR_BAIRRO'
      Required = True
      Size = 40
    end
    object CDS_ENTREGASEAR_CIDADE: TStringField
      DisplayLabel = 'Cidade:'
      FieldName = 'EAR_CIDADE'
      Required = True
      Size = 3
    end
    object CDS_ENTREGASEAR_ESTADO: TStringField
      DisplayLabel = 'Estado:'
      FieldName = 'EAR_ESTADO'
      Required = True
      Size = 2
    end
    object CDS_ENTREGASEAR_DATAPREVISTA: TDateField
      DisplayLabel = 'Data Prevista'
      FieldName = 'EAR_DATAPREVISTA'
      Required = True
    end
    object CDS_ENTREGASEAR_HORAPREVISTA: TTimeField
      DisplayLabel = 'Hora Prevista'
      FieldName = 'EAR_HORAPREVISTA'
      Required = True
      DisplayFormat = 'hh:nn'
    end
    object CDS_ENTREGASEAR_DATAEXECUCAO: TDateField
      DisplayLabel = 'Data de Execu'#231#227'o:'
      FieldName = 'EAR_DATAEXECUCAO'
    end
    object CDS_ENTREGASEAR_HORAEXECUCAO: TTimeField
      DisplayLabel = 'Hora de Execu'#231#227'o:'
      FieldName = 'EAR_HORAEXECUCAO'
      DisplayFormat = 'hh:nn'
    end
    object CDS_ENTREGASEAR_OBSEVACOES: TMemoField
      DisplayLabel = 'Observa'#231#245'es'
      FieldName = 'EAR_OBSEVACOES'
      BlobType = ftMemo
    end
    object CDS_ENTREGASEAR_COMPLEMENTO: TStringField
      DisplayLabel = 'Complemento:'
      FieldName = 'EAR_COMPLEMENTO'
      Size = 40
    end
    object CDS_ENTREGASEAR_SATISFACAO: TStringField
      DisplayLabel = 'Satisfa'#231#227'o:'
      FieldName = 'EAR_SATISFACAO'
      Size = 1
    end
    object CDS_ENTREGASEAR_RESPONSAVEL: TStringField
      DisplayLabel = 'Respons'#225'vel:'
      FieldName = 'EAR_RESPONSAVEL'
      Size = 3
    end
    object CDS_ENTREGASEAR_EXECUTADO: TStringField
      DisplayLabel = 'Servi'#231'o Executado:'
      FieldName = 'EAR_EXECUTADO'
      Size = 1
    end
  end
  object DSP_ENTREGAS: TDataSetProvider
    DataSet = ZENTREGAS
    Left = 409
    Top = 121
  end
  object ZENTREGAS: TZQuery
    Connection = DtmGeral.ZConexaoBanco
    UpdateObject = UpdateEntregas
    SQL.Strings = (
      'SELECT * FROM ENTREGAS_ARMACOES WHERE EAR_ID = :EAR_ID')
    Params = <
      item
        DataType = ftInteger
        Name = 'EAR_ID'
        ParamType = ptUnknown
        Value = 0
      end>
    Left = 673
    Top = 57
    ParamData = <
      item
        DataType = ftInteger
        Name = 'EAR_ID'
        ParamType = ptUnknown
        Value = 0
      end>
    object ZENTREGASEAR_ID: TIntegerField
      FieldName = 'EAR_ID'
      Required = True
    end
    object ZENTREGASEAR_DOCUMENTO: TStringField
      FieldName = 'EAR_DOCUMENTO'
      Required = True
      Size = 13
    end
    object ZENTREGASEAR_ENDERECO: TStringField
      FieldName = 'EAR_ENDERECO'
      Required = True
      Size = 40
    end
    object ZENTREGASEAR_BAIRRO: TStringField
      FieldName = 'EAR_BAIRRO'
      Required = True
      Size = 40
    end
    object ZENTREGASEAR_CIDADE: TStringField
      FieldName = 'EAR_CIDADE'
      Required = True
      Size = 3
    end
    object ZENTREGASEAR_ESTADO: TStringField
      FieldName = 'EAR_ESTADO'
      Required = True
      Size = 2
    end
    object ZENTREGASEAR_DATAPREVISTA: TDateField
      FieldName = 'EAR_DATAPREVISTA'
      Required = True
    end
    object ZENTREGASEAR_HORAPREVISTA: TTimeField
      FieldName = 'EAR_HORAPREVISTA'
      Required = True
    end
    object ZENTREGASEAR_DATAEXECUCAO: TDateField
      FieldName = 'EAR_DATAEXECUCAO'
    end
    object ZENTREGASEAR_HORAEXECUCAO: TTimeField
      FieldName = 'EAR_HORAEXECUCAO'
    end
    object ZENTREGASEAR_OBSEVACOES: TMemoField
      FieldName = 'EAR_OBSEVACOES'
      BlobType = ftMemo
    end
    object ZENTREGASEAR_COMPLEMENTO: TStringField
      FieldName = 'EAR_COMPLEMENTO'
      Size = 40
    end
    object ZENTREGASEAR_SATISFACAO: TStringField
      FieldName = 'EAR_SATISFACAO'
      Size = 1
    end
    object ZENTREGASEAR_RESPONSAVEL: TStringField
      FieldName = 'EAR_RESPONSAVEL'
      Size = 3
    end
    object ZENTREGASEAR_EXECUTADO: TStringField
      FieldName = 'EAR_EXECUTADO'
      Size = 1
    end
  end
  object UpdateEntregas: TZUpdateSQL
    DeleteSQL.Strings = (
      'DELETE FROM ENTREGAS_ARMACOES'
      'WHERE'
      '  ENTREGAS_ARMACOES.EAR_ID = :OLD_EAR_ID')
    InsertSQL.Strings = (
      'INSERT INTO ENTREGAS_ARMACOES'
      '  (EAR_ID, EAR_DOCUMENTO, EAR_ENDERECO, EAR_BAIRRO, '
      'EAR_CIDADE, EAR_ESTADO, EAR_DATAPREVISTA, '
      '   EAR_HORAPREVISTA, EAR_DATAEXECUCAO, '
      'EAR_HORAEXECUCAO, EAR_OBSEVACOES, '
      '   EAR_COMPLEMENTO, EAR_SATISFACAO, EAR_RESPONSAVEL, '
      'EAR_EXECUTADO)'
      'VALUES'
      '  (:EAR_ID, :EAR_DOCUMENTO, :EAR_ENDERECO, :EAR_BAIRRO, '
      ':EAR_CIDADE, :EAR_ESTADO, '
      '   :EAR_DATAPREVISTA, :EAR_HORAPREVISTA, '
      ':EAR_DATAEXECUCAO, :EAR_HORAEXECUCAO, '
      '   :EAR_OBSEVACOES, :EAR_COMPLEMENTO, :EAR_SATISFACAO, '
      ':EAR_RESPONSAVEL, '
      '   :EAR_EXECUTADO)')
    ModifySQL.Strings = (
      'UPDATE ENTREGAS_ARMACOES SET'
      '  EAR_DOCUMENTO = :EAR_DOCUMENTO,'
      '  EAR_ENDERECO = :EAR_ENDERECO,'
      '  EAR_BAIRRO = :EAR_BAIRRO,'
      '  EAR_CIDADE = :EAR_CIDADE,'
      '  EAR_ESTADO = :EAR_ESTADO,'
      '  EAR_DATAPREVISTA = :EAR_DATAPREVISTA,'
      '  EAR_HORAPREVISTA = :EAR_HORAPREVISTA,'
      '  EAR_DATAEXECUCAO = :EAR_DATAEXECUCAO,'
      '  EAR_HORAEXECUCAO = :EAR_HORAEXECUCAO,'
      '  EAR_OBSEVACOES = :EAR_OBSEVACOES,'
      '  EAR_COMPLEMENTO = :EAR_COMPLEMENTO,'
      '  EAR_SATISFACAO = :EAR_SATISFACAO,'
      '  EAR_RESPONSAVEL = :EAR_RESPONSAVEL,'
      '  EAR_EXECUTADO = :EAR_EXECUTADO'
      'WHERE'
      '  ENTREGAS_ARMACOES.EAR_ID = :OLD_EAR_ID')
    UseSequenceFieldForRefreshSQL = False
    Left = 593
    Top = 57
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'EAR_DOCUMENTO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_ENDERECO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_BAIRRO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_CIDADE'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_ESTADO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_DATAPREVISTA'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_HORAPREVISTA'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_DATAEXECUCAO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_HORAEXECUCAO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_OBSEVACOES'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_COMPLEMENTO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_SATISFACAO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_RESPONSAVEL'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_EXECUTADO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'OLD_EAR_ID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAR_ID'
        ParamType = ptUnknown
      end>
  end
  object ZEA_ITENS: TZQuery
    Connection = DtmGeral.ZConexaoBanco
    UpdateObject = ZUpdateEA_ITENS
    SQL.Strings = (
      'SELECT*'
      'FROM ENTREGA_ARMACAO_ITENS'
      'WHERE EAI_IDDOCUMENTO = :EAR_ID')
    Params = <
      item
        DataType = ftUnknown
        Name = 'EAR_ID'
        ParamType = ptUnknown
      end>
    Left = 681
    Top = 121
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'EAR_ID'
        ParamType = ptUnknown
      end>
    object ZEA_ITENSEAI_IDDOCUMENTO: TIntegerField
      FieldName = 'EAI_IDDOCUMENTO'
      Required = True
    end
    object ZEA_ITENSEAI_SEQUENCIAL: TSmallintField
      FieldName = 'EAI_SEQUENCIAL'
      Required = True
    end
    object ZEA_ITENSEAI_SAIDADOC: TIntegerField
      FieldName = 'EAI_SAIDADOC'
      Required = True
    end
    object ZEA_ITENSEAI_SAIDAITEM: TSmallintField
      FieldName = 'EAI_SAIDAITEM'
      Required = True
    end
    object ZEA_ITENSEAI_QTDARMACAO: TFloatField
      FieldName = 'EAI_QTDARMACAO'
    end
    object ZEA_ITENSEAI_QTDENTREGA: TFloatField
      FieldName = 'EAI_QTDENTREGA'
    end
  end
  object ZUpdateEA_ITENS: TZUpdateSQL
    DeleteSQL.Strings = (
      'DELETE FROM ENTREGA_ARMACAO_ITENS'
      'WHERE'
      
        '  ENTREGA_ARMACAO_ITENS.EAI_IDDOCUMENTO = :OLD_EAI_IDDOCUMENTO A' +
        'ND'
      '  ENTREGA_ARMACAO_ITENS.EAI_SEQUENCIAL = :OLD_EAI_SEQUENCIAL')
    InsertSQL.Strings = (
      'INSERT INTO ENTREGA_ARMACAO_ITENS'
      
        '  (EAI_IDDOCUMENTO, EAI_SEQUENCIAL, EAI_SAIDADOC, EAI_SAIDAITEM,' +
        ' EAI_QTDARMACAO, '
      '   EAI_QTDENTREGA)'
      'VALUES'
      
        '  (:EAI_IDDOCUMENTO, :EAI_SEQUENCIAL, :EAI_SAIDADOC, :EAI_SAIDAI' +
        'TEM, :EAI_QTDARMACAO, '
      '   :EAI_QTDENTREGA)')
    ModifySQL.Strings = (
      'UPDATE ENTREGA_ARMACAO_ITENS SET'
      '  EAI_IDDOCUMENTO = :EAI_IDDOCUMENTO,'
      '  EAI_SEQUENCIAL = :EAI_SEQUENCIAL,'
      '  EAI_SAIDADOC = :EAI_SAIDADOC,'
      '  EAI_SAIDAITEM = :EAI_SAIDAITEM,'
      '  EAI_QTDARMACAO = :EAI_QTDARMACAO,'
      '  EAI_QTDENTREGA = :EAI_QTDENTREGA'
      'WHERE'
      '  ENTREGA_ARMACAO_ITENS.EAI_IDDOCUMENTO = '
      ':OLD_EAI_IDDOCUMENTO AND'
      '  ENTREGA_ARMACAO_ITENS.EAI_SEQUENCIAL = '
      ':OLD_EAI_SEQUENCIAL')
    UseSequenceFieldForRefreshSQL = False
    Left = 592
    Top = 121
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'EAI_IDDOCUMENTO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAI_SEQUENCIAL'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAI_SAIDADOC'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAI_SAIDAITEM'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAI_QTDARMACAO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EAI_QTDENTREGA'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'OLD_EAI_IDDOCUMENTO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'OLD_EAI_SEQUENCIAL'
        ParamType = ptUnknown
      end>
  end
  object DSP_EAITENS: TDataSetProvider
    DataSet = ZEA_ITENS
    Left = 473
    Top = 121
  end
  object CDS_EAITENS: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftUnknown
        Name = 'EAR_ID'
        ParamType = ptUnknown
      end>
    ProviderName = 'DSP_EAITENS'
    AfterOpen = CDS_EAITENSAfterOpen
    AfterDelete = CDS_EAITENSAfterDelete
    OnCalcFields = CDS_EAITENSCalcFields
    Left = 449
    Top = 185
    object CDS_EAITENSEAI_IDDOCUMENTO: TIntegerField
      DisplayLabel = 'Documento:'
      FieldName = 'EAI_IDDOCUMENTO'
      Required = True
    end
    object CDS_EAITENSEAI_SEQUENCIAL: TSmallintField
      DisplayLabel = 'Sequencial:'
      FieldName = 'EAI_SEQUENCIAL'
      Required = True
    end
    object CDS_EAITENSEAI_SAIDADOC: TIntegerField
      DisplayLabel = 'Documento de Sa'#237'da:'
      FieldName = 'EAI_SAIDADOC'
      Required = True
    end
    object CDS_EAITENSEAI_SAIDAITEM: TSmallintField
      DisplayLabel = 'Item da Sa'#237'da:'
      FieldName = 'EAI_SAIDAITEM'
      Required = True
    end
    object CDS_EAITENSDescricao: TStringField
      FieldKind = fkCalculated
      FieldName = 'Descricao'
      Size = 40
      Calculated = True
    end
    object CDS_EAITENSEAI_QTDARMACAO: TFloatField
      FieldName = 'EAI_QTDARMACAO'
    end
    object CDS_EAITENSEAI_QTDENTREGA: TFloatField
      FieldName = 'EAI_QTDENTREGA'
    end
  end
  object DtsrcItens: TDataSource
    DataSet = CDS_EAITENS
    Left = 513
    Top = 169
  end
  object ZQuery: TZReadOnlyQuery
    Connection = DtmGeral.ZConexaoBanco
    Params = <>
    Left = 529
    Top = 57
  end
  object QryProduto: TZReadOnlyQuery
    Connection = DtmGeral.ZConexaoBanco
    SQL.Strings = (
      'select esp.ESP_DESCRI from '
      'SAIDA_ITEM si'
      'inner join '
      'ESTOQUE_PRODUTO esp'
      'on esp.ESP_IDFCOD = si.SAI_IDFITEM'
      'where si.SAI_IDFDOC = :SAI_IDFDOC '
      'AND SI.SAI_SEQITEM = :SAI_SEQITEM')
    Params = <
      item
        DataType = ftUnknown
        Name = 'sai_idfdoc'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'SAI_SEQITEM'
        ParamType = ptUnknown
      end>
    Left = 481
    Top = 57
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'sai_idfdoc'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'SAI_SEQITEM'
        ParamType = ptUnknown
      end>
  end
  object RvRenderPDF1: TRvRenderPDF
    DisplayName = 'Adobe Acrobat (PDF)'
    FileExtension = '*.pdf'
    EmbedFonts = False
    ImageQuality = 90
    MetafileDPI = 300
    FontEncoding = feWinAnsiEncoding
    DocInfo.Creator = 'MKS (http://www.marksystte.com.br'
    DocInfo.Producer = 'Markosystte - Sistemas de Automa'#231#227'o'
    Left = 672
    Top = 281
  end
  object RvProjectModelo: TRvProject
    Engine = DtmGeral.RvS_Relatorios
    Left = 512
    Top = 281
  end
  object rds_dataset_documento: TRvDataSetConnection
    RuntimeVisibility = rtDeveloper
    DataSet = CDS_ENTREGAS
    Left = 544
    Top = 281
  end
  object rds_dataset_itens: TRvDataSetConnection
    RuntimeVisibility = rtDeveloper
    DataSet = CDS_EAITENS
    Left = 576
    Top = 281
  end
  object rds_dataset_cliente: TRvDataSetConnection
    RuntimeVisibility = rtDeveloper
    DataSet = QryDocSaida
    Left = 608
    Top = 281
  end
  object QryDocSaida: TZReadOnlyQuery
    Connection = DtmGeral.ZConexaoBanco
    SQL.Strings = (
      'SELECT PES.PES_NOME , SD.SAD_DATAVE, SD.SAD_IDFDOC,'
      '             SD.SAD_DOCUME, emp.EMP_CODIGO , emp.EMP_FANTAS '
      'FROM PESSOAS PES INNER JOIN SAIDA_DOCUMENTO SD '
      '               ON SD.SAD_CODCLI = PES.PES_IDFCOD'
      
        '           INNER JOIN EMPRESAS EMP ON EMP.EMP_CODIGO = sd.SAD_ID' +
        'FEMPRESA'
      'WHERE SD.SAD_IDFDOC = :IDF')
    Params = <
      item
        DataType = ftInteger
        Name = 'IDF'
        ParamType = ptUnknown
      end>
    Left = 537
    Top = 97
    ParamData = <
      item
        DataType = ftInteger
        Name = 'IDF'
        ParamType = ptUnknown
      end>
    object QryDocSaidaPES_NOME: TStringField
      FieldName = 'PES_NOME'
      Required = True
      Size = 60
    end
    object QryDocSaidaSAD_DATAVE: TDateField
      FieldName = 'SAD_DATAVE'
      Required = True
    end
    object QryDocSaidaSAD_IDFDOC: TIntegerField
      FieldName = 'SAD_IDFDOC'
      Required = True
    end
    object QryDocSaidaSAD_DOCUME: TStringField
      FieldName = 'SAD_DOCUME'
      Required = True
      Size = 13
    end
    object QryDocSaidaEMP_CODIGO: TSmallintField
      FieldName = 'EMP_CODIGO'
      Required = True
    end
    object QryDocSaidaEMP_FANTAS: TStringField
      FieldName = 'EMP_FANTAS'
      Required = True
      Size = 60
    end
  end
end
